﻿using System;
using System.Collections.Generic;
using System.Text;
using yb.commerce.DAL;
using yb.commerce.Model;

namespace yb.commerce.BLL
{
    public class AdminBusiness
    {
        public bool Add(Admin admin)
        {
            return new AdminDAO().Add(admin);
        }

        public bool Delete(int Id)
        {
            return new AdminDAO().Delete(Id);
        }

        public bool Update(Admin admin)
        {
            return new AdminDAO().Update(admin);
        }
        public bool UpdateState(Admin admin)
        {
            return new AdminDAO().UpdateState(admin);
        }
        public bool UpdatePassword(Admin admin)
        {
            return new AdminDAO().UpdatePassword(admin);
        }
        public bool Validate(Admin admin)
        {
            return new AdminDAO().Validate(admin);
        }
        public bool IsSameUserName(Admin admin)
        {
            return new AdminDAO().IsSameUserName(admin);
        }

        public Admin GetEntity(int Id)
        {
            return new AdminDAO().GetEntity(Id);
        }
        public Admin GetEntityByUserName(string adminName)
        {
            return new AdminDAO().GetEntityByUserName(adminName);
        }

        public DataRecordTable GetList(string fieldList, string orderField, bool orderBy, int pageIndex, int pageSize, string where)
        {
            return new AdminDAO().GetList(fieldList,orderField,orderBy,pageIndex,pageSize,where);
        }
    }
}
